package com.haizhi.crm.api.controller.concern;

import com.haizhi.crm.biz.model.ConcernedQo;
import com.haizhi.crm.biz.service.ConcernService;
import com.haizhi.crm.common.model.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created by yangyijun on 2018/6/24.
 */
@Api(description = "[业务-用户关注]-公用接口" )
@RestController
@RequestMapping("" )
public class ConcernController {

    @Autowired
    private ConcernService concernService;

    @ApiOperation(value = "公用-关注|取消关注", notes = "适用于客户、行内动态、行外事件、产品、拜访记录；保存信息到mysql库tb_concerned表。 entityType：实体对应的表名" )
    @PostMapping("/concern" )
    public Response concern(@RequestBody @Valid ConcernedQo concernedQo) {
        return concernService.concern(concernedQo);
    }
}
